function ios() {
	cover(function() {
		window.location.href = 'https://itunes.apple.com/cn/app/sama%E8%B5%9E%E8%B5%8F%E7%A4%BE-%E8%AE%A9%E5%86%85%E5%AE%B9-%E4%BA%A7%E5%87%BA%E4%BB%B7%E5%80%BC/id1313146736?mt=8'
	})
}

function android() {
	cover(function() {
		window.location = link
	})
}

function cover(callback) {
	var safariDom = document.getElementById('safari')
	var safariDomDisplay = !isSafariValue ? 'none' : 'block'
	safariDom.style.display = safariDomDisplay
	if(callback) callback()
}

function isSafari() {
	var ua = navigator.userAgent.toLowerCase()
	return ua.match(/MicroMessenger/i) == 'micromessenger' || ua.match(/WeiBo/i) == 'weibo' || ua.match(/QQ/i) ==
		'qq'
}

var safariDom = document.getElementById('safari')
var iosDom = document.getElementById('ios')
var androidDom = document.getElementById('android')
var isSafariValue = isSafari()

if(!isSafariValue) safariDom.style.display = 'none'

iosDom.addEventListener('click', ios)
androidDom.addEventListener('click', android)
